from selenium import  webdriver
from selenium.webdriver.common.by import By
from time import sleep

op = webdriver.ChromeOptions()
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_experimental_option("useAutomationExtension", False)
driver = webdriver.Chrome(options = op)

driver.get(r"https://www.mosoteach.cn/web/index.php?c=passport&m=index")

driver.find_element(By.XPATH,'//*[@id="account-name"]').send_keys('')
driver.find_element(By.XPATH,'//*[@id="user-pwd"]').send_keys('')
firstnews = driver.find_element(By.XPATH,'//*[@id="login-button-1"]')
content = firstnews.text
firstnews.click()
sleep(3)

current = driver.current_window_handle
all_handles = driver.window_handles
driver.switch_to.window(all_handles[0])
# print(driver.title)
assert "云班课 - 我的班课" in driver.title

driver.quit()